using UnityEngine;

/// <summary>
/// Singleton monobehaviour.
/// </summary>
/// <typeparam name="T">Monobehaviour classes.</typeparam>
public abstract class SigtMnb<T> : MonoBehaviour where T : MonoBehaviour
{
    public static T Instance { get; protected set; }

    protected void IniSigt()
    {
        if (Instance != null)
        {
            Destroy(gameObject);
            return;
        }
        Instance = this as T;
        DontDestroyOnLoad(this);
    }
}
